package com.pgybook.front.action;

import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.context.request.WebRequest;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;

import javax.servlet.http.HttpServletRequest;

/**
 * Created with IntelliJ IDEA.
 * User: feeling
 * Date: 13-11-19
 * Time: 下午1:36
 */
@Controller
public class StaticPage {

    @RequestMapping(value="error404.jspx",method = RequestMethod.GET)
    @ResponseStatus(HttpStatus.NOT_FOUND)
    public String error404(HttpServletRequest r,WebRequest request,Model model ,RedirectAttributes attributes){
        System.out.println("this is 404");
        return "forward:/index.html";
    }

}
